<template>
  <div>
    <!--条件筛选-->
    <TopFilter :list="topFilterList" :cols="4" labelWidth="85" :collapse="false" @filterChange="changeHandle" @onCollapse="collapseHandle"></TopFilter>
    <!--操作 -->
    <button-area :style="{ paddingLeft: '80px' }"></button-area>
    <!-- 列筛选-->
    <FilterTable
      ref="table"
      columnsRef="zxWhMainPage"
      :columns="columns"
      :fetchapi="fetchApi"
      :params="fetchParams"
      :datakey="'rows'"
      :onRowSelectChange="handleRowSelectChange"
      selectionType="single"
      :onColumnsChange="columns => (this.columns = columns)"
      :isExportExcel="true"
      :onCalcExportData="exportFun"
      exportFileName="配件销售结算情况.xlsx"
    >
      <!--  :dataSource="dataSource"
      :isMemoryPagination="true" -->
      <template slot="controls">
        <!-- <el-button size="small" type="primary" @click="handleUpload">上传</el-button> -->
        <AjaxButton size="small" type="primary" :disabled="printlSalesBtn" :click="printlSales">打印销售单</AjaxButton>
        <AjaxButton size="small" type="primary" :disabled="printlSettlementBtn" :click="printlSettlement">打印销售结算单</AjaxButton>
        <el-button size="small" type="primary" @click="handleDetial">查看结算记录</el-button>
      </template>
    </FilterTable>

    <!--对话框-->
    <BaseDialog :visible.sync="visible1" title="查看结算记录" destroyOnClose :containerStyle="{ height: 'calc(100% - 60px)', overflow: 'auto', paddingBottom: '60px' }">
      <StoreDetail :userList="userList" :balanceNo="balanceNo" :orderNo="orderNo" :type="handleType" :rowData="formData" @close="visible1 = false" />
    </BaseDialog>
    <!-- 销售明细单 -->
    <BaseDialog :visible.sync="saleOrderVisible" destroyOnClose title="销售明细单" :containerStyle="{ height: 'calc(100% - 60px)', overflow: 'auto', paddingBottom: '60px' }">
      <saleOrderDetail :orderNo="orderNo" @close="saleOrderVisible = false" />
    </BaseDialog>
    <!-- 配件结算情况明细 -->
    <BaseDialog :visible.sync="partBillDetailVisible" destroyOnClose title="配件结算情况明细" :containerStyle="{ height: 'calc(100% - 60px)', overflow: 'auto', paddingBottom: '60px' }">
      <partBill :userList="userList" :orderNo="orderNo" @close="partBillDetailVisible = false" />
    </BaseDialog>
    <!-- 明细 -->
    <!-- <BaseDialog :visible.sync="partBillDetailVisible" destroyOnClose title="配件结算情况明细" :containerStyle="{ height: 'calc(100% - 60px)', overflow: 'auto', paddingBottom: '60px' }">
      <partBill :userList="userList" :orderNo="orderNo" @close="partBillDetailVisible = false" />
    </BaseDialog> -->
    <div v-if="handleDyone">
      <BasePrint ref="Salesprint" :data="SalesprintList" template="templateSales" />
    </div>
    <div v-if="handleDdtwo">
      <BasePrint
        ref="Settlementsprint"
        :data="SettlementprintList"
        :printerType="settlementPrintParams.vPrintType ? (settlementPrintParams.vPrintType == 99901002 ? 'stylus' : 'laser') : 'stylus'"
        :alwaysPrint="settlementPrintParams.vPageType ? (settlementPrintParams.vPageType == 99911002 ? true : false) : false"
        :printCopies="settlementPrintParams.nPages || 1"
        :direction="settlementPrintParams.vPageDirection == 99921001 ? 'horizontal' : 'vertical'"
        :directPrint="settlementPrintParams.vDirectPrint ? (settlementPrintParams.vDirectPrint == 1 ? true : false) : true"
        :isDuplex="settlementPrintParams.vBothPrint == 1 ? true : false"
        template="templateSettlement"
      />
    </div>
  </div>
</template>

<script>
import { messageAction } from '@/utils';
import moment from 'moment';
import { dictionary } from '@/utils/dictMixin';
import { authority } from '@/utils/authMixin';
import { getSalessettlementList } from '@/api/part/report/salessettlement';
import StoreDetail from './storeDetail';
import saleOrderDetail from './saleOrderDetail';
import partBill from './partBill';
import partBillDetail from './partBillDetail';
import { printData, printDataTwo } from '@/api/part/partOut/partSales/index';
import { queryCompanyInforById } from '@/api/part/common';
import { getCompanyId } from '@/assets/js/auth';
import { isAuthorized, arrayObjDeWeight, setRound } from '@/utils/index';
import { findAllRepair } from '@/api/repair/basicParameters';
// 获取员工
import { getAllUser } from '@/api/part/common';
import { dealerPrintApi } from '@/api/repair/index.js';

// // // import res from '@/mock/tableData';
// 维护工具主文件
export default {
  name: 'zxWhMainPage',
  components: {
    saleOrderDetail,
    partBill,
    StoreDetail,
    partBillDetail
  },
  mixins: [dictionary],
  data() {
    return {
      topFilterList: this.createTopFilterList(),
      dataSource: [],
      // fetchApi: queryPartInOutStockReport,
      fetchParams: { xhrAbort: true },
      dialogTitle: '',
      selectedList: [], // 选中的列表
      fetchApi: getSalessettlementList,
      saleOrderVisible: false, // 是否展示销售订单详细
      partBillDetailVisible: false, // 是否配件结算情况详细
      visible1: false,
      columns: this.createTableColumns(),
      handleType: '',
      orderNo: '', // 编辑的数据
      formData: {},
      printlSalesBtn: false, // 打印销售单按钮  原 true
      printlSettlementBtn: false, // 打印销售结算单按钮 原 true
      handleDyone: false, // 打印销售单模板
      handleDdtwo: false, // 打印销售结算单模板
      SalesprintList: [], // 打印销售单数据
      SettlementprintList: [], // 打印销售结算单数据
      cunUserList: [], // 存所有人的数组
      userList: [], // 翻译用
      userListText: [], // 导出使用
      balanceNo: null,
      settlementPrintParams: {}, // 配件销售结算单打印
      saleOrderPrintParams: {} // 配件销售单打印
    };
  },
  computed: {
    ptype() {
      return this.$route.meta.ptype;
    } // 模块区分
  },
  mounted() {
    // 分页
    this.BaseTable = this.$refs.table.$refs.pageTable;
    this.getDealerUser();
    this.findAllRepair();
    this.querySettlementPrintParams();
    this.querySaleOrderPrintParams();
  },
  methods: {
    exportFun(row) {
      for (const key in row) {
        switch (key) {
          case 'CREATED_AT':
          case 'FINISHED_DATE':
          case 'BALANCE_TIME':
          case 'SQUARE_DATE':
            if (row[key]) {
              row[key] = moment(row[key]).format('YYYY-MM-DD');
            }
            break;
          // 解决销售员不显示
          // case 'CONSULTANT':
          // if (row[key]) {
          //   row[key] = this.userList[row[key]];
          // }
          // break;
          case 'OUT_AMOUNT':
          case 'PART_COST_PRICE':
          case 'CLOSE_AMOUNT':
          case 'CLOSE_PRICE':
          case 'INVENTORY_AMOUNT':
            if (row[key]) {
              row[key] = Number(row[key]).toFixed(2);
            }
            break;
          default:
            break;
        }
      }
    },
    // 获取所有人的信息
    async getDealerUser() {
      const res = await getAllUser();
      let userData = arrayObjDeWeight(res.data, 'userId');
      this.cunUserList = userData;
      userData.map(x => ((this.userList[x.userId] = x.employeeName), this.userListText.push({ text: x.employeeName, value: x.userId })));
      // console.log(this.userListText, 1232);
      this.columns.forEach(element => {
        if (element.dataIndex == 'CONSULTANT' || element.dataIndex == 'BALANCE_HANDLER') {
          element.dictItems = this.userListText;
        }
      });
    },
    async findAllRepair() {
      let re = await findAllRepair();
      sessionStorage.setItem('precision', re.data['8011']);
      sessionStorage.setItem('settlementType', re.data['1009']);
    },
    // 打印销售单
    async printlSales() {
      const res = await printData(this.selectedList[0].SALES_PART_NO);
      // 获取公司信息
      let componyInfo = '';
      try {
        componyInfo = await queryCompanyInforById({
          owenrCode: getCompanyId()
        });
      } catch (err) {
        console.log('获取公司信息失败', err);
      }
      this.handleDyone = true;
      this.SalesprintList = {
        ...res.data,
        compInfo: componyInfo.data
      };
      // console.log(this.SalesprintList);
      try {
        this.SalesprintList.baseInfo.USER_NAME = this.cunUserList.find(item => item.userId == this.SalesprintList.baseInfo.USER_ID).employeeName || '';
      } catch (err) {
        console.log(err);
      }
      if (this.SalesprintList.baseInfo.SALES_PART_AMOUNT) {
        this.SalesprintList.baseInfo.SALES_PART_AMOUNT = setRound(this.SalesprintList.baseInfo.SALES_PART_AMOUNT);
        // console.log(sessionStorage.getItem('precision'), sessionStorage.getItem('settlementType'), 'SALES_PART_AMOUNT', this.SalesprintList.baseInfo.SALES_PART_AMOUNT);
      }
      this.$nextTick(() => {
        this.$refs.Salesprint.EXCUTE_PRINT();
      });
    },
    // 打印销售结算单
    async printlSettlement() {
      const res = await printDataTwo(this.selectedList[0].SALES_PART_NO);
      this.handleDdtwo = true;
      // 获取公司信息
      let componyInfo = '';
      try {
        componyInfo = await queryCompanyInforById({
          owenrCode: getCompanyId()
        });
      } catch (err) {
        console.log('获取公司信息失败', err);
      }
      this.SettlementprintList = {
        ...res.data,
        compInfo: componyInfo.data
      };
      if (this.SettlementprintList.baseInfo.SALES_PART_AMOUNT) {
        this.SettlementprintList.baseInfo.SALES_PART_AMOUNT = setRound(this.SettlementprintList.baseInfo.SALES_PART_AMOUNT);
      }
      this.cunUserList.forEach(x => {
        if (this.SettlementprintList.baseInfo.USER_ID == x.userId) {
          this.SettlementprintList.baseInfo.USER_NAME = x.employeeName;
        }
      });
      this.$nextTick(() => {
        this.$refs.Settlementsprint.EXCUTE_PRINT();
      });
    },
    createTopFilterList() {
      return [
        {
          type: 'SELECT',
          label: '日期类别',
          fieldName: 'type',
          initialValue: '1',
          itemList: [
            { text: '开单日期', value: '1' },
            { text: '结算日期', value: '2' },
            { text: '入出库日期', value: '3' },
            { text: '首次结算日期', value: '4' }
          ]
        },
        {
          type: 'RANGE_DATE',
          fieldName: 'beginData|endData',
          label: '日期范围',
          dateType: 'daterange',
          initialValue: [
            moment(new Date())
              .subtract(1, 'months')
              .format('YYYY-MM-DD'),
            moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
          ],
          rules: [{ required: true, message: '请选择日期范围', trigger: 'blur' }]
        },
        {
          type: 'SELECT',
          label: '是否出库',
          fieldName: 'isFinish',
          // initialValue: 10041002,
          itemList: this.createDictList(1004)
        },
        {
          type: 'SELECT',
          label: '是否结算',
          fieldName: 'isBalance',
          // initialValue: 10041001,
          itemList: this.createDictList(1004)
        },
        {
          type: 'INPUT',
          label: '客户名称',
          fieldName: 'customerName'
        }
      ];
    },
    createTableColumns() {
      return [
        {
          title: '操作',
          fixed: 'left',
          dataIndex: 'column-action',
          width: 150,
          render: params => {
            return (
              <div>
                <el-button type="text" size="mini" onClick={() => this.handleEdit(params.row)}>
                  查看
                </el-button>
                <el-divider direction="vertical"></el-divider>
                <el-button type="text" size="mini" onClick={() => this.handleCheckDetail(params.row)}>
                  查看结算明细
                </el-button>
              </div>
            );
          }
        },
        {
          title: '销售单编号',
          dataIndex: 'SALES_PART_NO',
          sorter: true,
          filter: true,
          filterType: 'input',
          showOverflowTooltip: true
        },
        {
          title: '客户代码',
          dataIndex: 'CUSTOMER_CODE',
          sorter: true,
          filter: true,
          filterType: 'input',
          showOverflowTooltip: true
        },
        {
          title: '客户名称',
          dataIndex: 'CUSTOMER_NAME',
          sorter: true,
          filter: true,
          filterType: 'input',
          showOverflowTooltip: true
        },
        {
          title: '开单日期',
          dataIndex: 'CREATED_AT',
          sorter: true,
          filter: true,
          filterType: 'date-range',
          dateFormat: 'yyyy-MM-dd',
          valueFormat: 'yyyy-MM-dd',
          showOverflowTooltip: true
        },
        {
          title: '销售员',
          dataIndex: 'CONSULTANT',
          sorter: true,
          filter: true,
          filterType: 'input',
          dictItems: [],
          render: props => {
            return <span>{this.userList[props.row.CONSULTANT]}</span>;
          },
          showOverflowTooltip: true
        },
        // {
        //   title: '结算状态1',
        //   dataIndex: 'BALANCE_STATUS',
        //   filterType: 'input'
        // },
        // {
        //   type: 'CHECKBOX',
        //   label: '是否结清',
        //   fieldName: 'BALANCE_STATUS',
        //   placeholder: '',
        //   options: { trueValue: '10041001', falseValue: '10041002' }
        // },
        {
          title: '结算状态',
          dataIndex: 'BALANCE_STATUS',
          // filterType: 'checkbox',
          disabled: true,
          sorter: true,
          dictItems: this.createDictList('1004'),
          render: props => {
            if (props.row.BALANCE_STATUS === 10041001) {
              return <input type="checkbox" checked disabled />;
            } else {
              return <input type="checkbox" disabled />;
            }
          },
          showOverflowTooltip: true
        },
        {
          title: '结算员',
          dataIndex: 'BALANCE_HANDLER',
          sorter: true,
          filter: true,
          filterType: 'input',
          dictItems: [],
          render: props => {
            return <span>{this.userList[props.row.BALANCE_HANDLER]}</span>;
          },
          showOverflowTooltip: true
        },
        {
          title: '合计金额',
          dataIndex: 'SUM_AMOUNT',
          sorter: true,
          filter: true,
          filterType: 'number',
          precision: 2,
          summation: true,
          summationDataIndex: 'TOTAL_SUM_AMOUNT'
        },
        {
          title: '合计税额',
          dataIndex: 'TAX_AMOUNT',
          sorter: true,
          filter: true,
          filterType: 'number',
          precision: 2,
          summation: true,
          summationDataIndex: 'TOTAL_TAX_AMOUNT'
        },
        {
          title: '优惠率',
          dataIndex: 'DISCOUNT_RATE',
          sorter: true,
          filter: true,
          filterType: 'input'
        },
        {
          title: '合计优惠',
          dataIndex: 'DERATE_AMOUNT',
          sorter: true,
          filter: true,
          filterType: 'number',
          precision: 2,
          summation: true,
          summationDataIndex: 'TOTAL_DERATE_AMOUNT'
        },
        {
          title: '暂收金额',
          dataIndex: 'SUSPEND_AMOUNT',
          sorter: true,
          filter: true,
          filterType: 'number',
          precision: 2,
          summation: true,
          summationDataIndex: 'TOTAL_SUSPEND_AMOUNT'
        },
        {
          title: '其他费1',
          dataIndex: 'OTHER_FEE1',
          sorter: true,
          filter: true,
          filterType: 'input',
          summation: true,
          precision: 2,
          summationDataIndex: 'TOTAL_OTHER_FEE1'
        },
        {
          title: '其他费2',
          dataIndex: 'OTHER_FEE2',
          sorter: true,
          filter: true,
          filterType: 'input',
          precision: 2,
          summation: true,
          summationDataIndex: 'TOTAL_OTHER_FEE2'
        },
        {
          title: '其他费3',
          dataIndex: 'OTHER_FEE3',
          sorter: true,
          filter: true,
          filterType: 'input',
          precision: 2,
          summation: true,
          summationDataIndex: 'TOTAL_OTHER_FEE3'
        },
        {
          title: '担保人',
          dataIndex: 'GUARANTOR',
          sorter: true,
          filter: true,
          filterType: 'input',
          showOverflowTooltip: true
        },
        {
          title: '销售类型',
          dataIndex: 'SALE_TYPE',
          sorter: true,
          filter: true,
          filterType: 'checkbox',
          filterItems: this.createDictList('1712'),
          dictItems: this.createDictList('1712'),
          render: props => {
            // console.log(props.row);
            return <span>{this.createDictText(props.row.SALE_TYPE, '1712')}</span>;
          },
          showOverflowTooltip: true
        },
        {
          title: '销售方式',
          dataIndex: 'SALES_TYPE',
          sorter: true,
          filter: true,
          filterType: 'checkbox',
          filterItems: this.createDictList('8096'),
          dictItems: this.createDictList('8096'),
          render: props => {
            // console.log(props.row);
            return <span>{this.createDictText(props.row.SALES_TYPE, '8096')}</span>;
          },
          showOverflowTooltip: true
        },
        {
          title: '批量结算号',
          dataIndex: 'BALANCE_NO',
          sorter: true,
          filter: true,
          filterType: 'input',
          showOverflowTooltip: true
        },
        {
          title: '仓库代码',
          dataIndex: 'STORAGE_CODE',
          sorter: true,
          filter: true,
          filterType: 'input',
          showOverflowTooltip: true
        },
        {
          title: '仓库名称',
          dataIndex: 'STORAGE_NAME',
          sorter: true,
          filter: true,
          filterType: 'input',
          showOverflowTooltip: true
        },
        // {
        //   title: '首次结算日期',
        //   dataIndex: 'FIRST_DATA',
        //   filterType: 'date-range',
        //   dateFormat: 'yyyy-MM-dd',
        //   valueFormat: 'yyyy-MM-dd'
        // },
        {
          title: '结算日期',
          dataIndex: 'SQUARE_DATE',
          sorter: true,
          filter: true,
          filterType: 'date-range',
          dateFormat: 'yyyy-MM-dd',
          valueFormat: 'yyyy-MM-dd'
        },
        {
          title: '成本金额',
          dataIndex: 'PART_COST_AMOUNT',
          sorter: true,
          filter: true,
          filterType: 'number',
          precision: 2,
          summation: true,
          summationDataIndex: 'TOTAL_PART_COST_AMOUNT'
        },
        {
          title: '配件代码',
          dataIndex: 'PART_NO',
          sorter: true,
          filter: true,
          filterType: 'input',
          showOverflowTooltip: true
        },
        {
          title: '配件名称',
          dataIndex: 'PART_NAME',
          sorter: true,
          filter: true,
          filterType: 'input',
          showOverflowTooltip: true
        },
        {
          title: 'ABC分类',
          dataIndex: 'ABC_TYPE',
          sorter: true,
          filter: true,
          filterType: 'checkbox',
          filterItems: this.createDictList('8092'),
          dictItems: this.createDictList('8092'),
          render: props => {
            // console.log(props.row);
            return <span>{this.createDictText(props.row.ABC_TYPE, '8092')}</span>;
          }
        },
        {
          title: '含税销售单价',
          dataIndex: 'PART_SALES_PRICE',
          sorter: true,
          filter: true,
          filterType: 'number',
          precision: 2
        },
        {
          title: '原销售单价',
          dataIndex: 'ORIGINAL_PRICE',
          sorter: true,
          filter: true,
          filterType: 'number',
          precision: 2
        },
        {
          title: '销售数量',
          dataIndex: 'PART_QUANTITY',
          sorter: true,
          filter: true,
          filterType: 'number',
          precision: 2,
          summation: true,
          summationDataIndex: 'TOTAL_PART_QUANTITY'
        },
        {
          title: '不含税成本单价',
          dataIndex: 'PART_COST_PRICE',
          sorter: true,
          filter: true,
          filterType: 'number',
          precision: 2
        },
        {
          title: '入出库日期',
          dataIndex: 'FINISHED_DATE',
          sorter: true,
          filter: true,
          filterType: 'date-range',
          dateFormat: 'yyyy-MM-dd',
          valueFormat: 'yyyy-MM-dd'
        },
        {
          title: '提货标识',
          dataIndex: 'IS_FINISHED',
          sorter: true,
          filter: true,
          filterType: 'checkbox',
          filterItems: this.createDictList('1004'),
          dictItems: this.createDictList('1004'),
          render: props => {
            return <span>{this.createDictText(props.row.IS_FINISHED, '1004')}</span>;
          },
          showOverflowTooltip: true
        },
        {
          title: '付款日期',
          dataIndex: 'SQUARE_DATE',
          sorter: true,
          filter: true,
          filterType: 'date-range',
          dateFormat: 'yyyy-MM-dd',
          valueFormat: 'yyyy-MM-dd'
        },
        {
          title: '开户行',
          dataIndex: 'BANK',
          sorter: true,
          filter: true,
          filterType: 'input',
          showOverflowTooltip: true
        },
        {
          title: '银行账号',
          dataIndex: 'BANK_ACCOUNT',
          sorter: true,
          filter: true,
          filterType: 'input',
          showOverflowTooltip: true
        },
        {
          title: '税号',
          dataIndex: 'TAX_NO',
          sorter: true,
          filter: true,
          filterType: 'input',
          showOverflowTooltip: true
        }
        // ,
        // {
        //   title: '退单标识',
        //   dataIndex: 'stockQuantity',
        //   filterType: 'input'
        // }
      ];
    },
    handleRowSelectChange(e) {
      if (e && e.length) {
        this.selectedList = e;
        this.balanceNo = e[0].BALANCE_NO;
      }
    },
    async changeHandle(val) {
      // this.dataSource = [];
      if (val.beginData) {
        val.beginData = val.beginData.slice(0, 10) + ' 00:00:00';
        val.endData = val.endData.slice(0, 10) + ' 23:59:59';
      }
      if (val.beginData || val.endData) {
        let diffMonth = moment(val.endData).diff(moment(val.beginData), 'months');
        if (diffMonth > 5) return this.$notify.warning({ title: '提示信息', message: '起止日期跨度不能超过半年' });
      }
      this.fetchParams.xhrAbort = true;
      this.fetchParams = Object.assign({}, val, { xhrAbort: false });
      // let res = await getSalessettlementList(val);
      // if (res.resultCode == 200) {
      //   this.dataSource = res.data;
      // }
    },
    collapseHandle() {
      this.$nextTick(() => {
        this.BaseTable.EXECUTE_RESET_HEIGHT();
      });
    },
    closeHandler(val, type) {
      // 关闭
      this.visible = val;
      if (type === 'refresh') {
        // 重新加载
        this.fetchParams = { ...this.fetchParams };
      }
    },
    handleDetial() {
      var list = this.selectedList;
      // console.log(list);

      if (list.length == 0) {
        messageAction('请选择单据', 'warning');
      } else {
        this.orderNo = list[0].SALES_PART_NO;
        this.visible1 = true;
        // console.log(this.orderNo);
      }
    },
    handleEdit(e) {
      this.editData = e;
      this.orderNo = e.SALES_PART_NO;
      this.saleOrderVisible = true;
      // console.log(e);
      // console.log(this.orderNo);
    },
    handleCheckDetail(e) {
      this.editData = e;
      this.orderNo = e.SALES_PART_NO;
      this.partBillDetailVisible = true;
      console.log(e);
      console.log(1, this.orderNo);
    },
    // 重新查询table数据
    handleResearchTableData() {
      this.fetchParams.xhrAbort = true;
      this.fetchParams.xhrAbort = false;
    },
    // 查询配件销售结算单打印配置
    async querySettlementPrintParams() {
      let res = await dealerPrintApi({
        vModule: '90211009',
        vNormalCode: 'BJSXJS'
      });
      if (res.resultCode == 200 && res.data.length) {
        this.settlementPrintParams = res.data[0];
        this.settlementPrintParams.vDirectPrint = this.settlementPrintParams.vDirectPrint === 0 ? '0' : this.settlementPrintParams.vDirectPrin;
      }
      console.log(this.settlementPrintParams, '结算单打印配置');
    },
    // 查询销售单打印配置
    async querySaleOrderPrintParams() {
      let res = await dealerPrintApi({
        vModule: '90211009',
        vNormalCode: 'BJSX'
      });
      if (res.resultCode == 200 && res.data.length) {
        this.saleOrderPrintParams = res.data[0];
        this.saleOrderPrintParams.vDirectPrint = this.saleOrderPrintParams.vDirectPrint === 0 ? '0' : this.saleOrderPrintParams.vDirectPrin;
      }
      console.log(this.settlementPrintParams, '销售单打印配置');
    }
  },
  // 点击上传
  async handleUpload() {
    let res = await PartUploadSPP();
    if (res.resultCode == 200) {
      messageAction('上传成功', 'success');
    }
  }
};
</script>

<style lang="less" scoped></style>
